//
// Created by hunan on 25-3-25.
//

#ifndef SOCKET_UTIL_H
#define SOCKET_UTIL_H

#include <cstdint>
#include <string>

class WriteReadBuffer;;
class SocketAddress;
class SocketUtil
{
public:
    static int Read(int socket, WriteReadBuffer & buffer);
    static int Write(int socket, WriteReadBuffer & buffer);
    static int Accept(int socket, SocketAddress & address);
    static int BindAddress(int socket, const SocketAddress & address);
    static int BindAddress(int socket, int type, int family, uint16_t port, const std::string & ip);
};

#endif // SOCKET_UTIL_H
